<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %>
<jsp:include page="/WEB-INF/views/comm/title.jsp"></jsp:include>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/css/blogPost.css">
<body>
<!-- Prompt IE 7 users to install Chrome Frame -->
<!--[if lt IE 8]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->

<div class="container">

<jsp:include page="/WEB-INF/views/comm/header.jsp"></jsp:include>


	<div class="blogpost-page main grid-wrap">

		<header class="grid col-full">
			<hr>
			<p class="fleft"><a href="/views/blog.do" >목록으로 돌아가기 </a></p>
		</header>
		
				
		<section class="grid col-three-quarters mq2-col-two-thirds mq3-col-full">
			
				<article class="post post-single">
					<div class="meta">
						<p>Posted on <span class="time">November 15, 2011</span> by <a href="#" class="fn">${DATA.REG_NAME}</a> with <a href="#" class="comments-link">${COUNT_COMMENT} comments</a>.</p>
					</div>
					<div class="entry">
						${DATA.CONTENTS}
					</div>
					<div id="blog_btns" >
					<c:choose>
						<c:when test="${DATA.REG_NAME==USER_NAME}">
							<a id="btn_modify" >수정</a>
							<a id="btn_delete" >삭제</a>
						</c:when>
						<c:otherwise>
						</c:otherwise>
					</c:choose>
					<input  type="hidden" id="blog_no" value="${DATA.BLOG_NO}" >
					</div>
				</article>

				<section class="section-comment">

					<header>
						<hr>
						<h5 class="fleft">${COUNT_COMMENT} Comments</h5>
						
					</header>
					<hr>
					<div>
					
					<c:choose>
						<c:when test="${WRITE_YN == 'Y'}">
  							<label id="lbl_content" >${FAVORITE_USER} </label>
						</c:when>
						<c:otherwise>
							 <a id="btn_favorite" >좋아요 </a>
							  <label id="lbl_content" >${FAVORITE_USER} </label>				
						</c:otherwise>
					</c:choose>
					</div>
					<ol class="comments">
					<c:forEach items="${COMMENT_LIST}" var="commentList">
						
							<li class="comment">
								<h6>
									<strong>${commentList.REPLY_USER_NAME}</strong> <span class="meta"> on ${commentList.REPLY_USER_DATE}</span>
								</h6>
								<p>${commentList.REPLY_CONTENT}</p>
							</li>
						
					</c:forEach>
					</ol>
					
					<div class="leavecomment" id="leavecomment">
						<h3>답글을 남겨주세요. </h3>
							<ul>
								<li><label id="datePost" ></label></li>
								<li style="margin-bottom: 10px !important;width: 200px" ><span>등록자 명 : ${USER_NAME}</span></li>
								<li><textarea
										name="message" id="message" cols="100" rows="6" required
										class="required"></textarea></li>
								<li style="margin-top: 10px"  >
									<button  id="submit_func" class="button fright">답글달기</button>
								</li>
								<input type="hidden" id="parent_blog_no" value="${DATA.BLOG_NO}" >
								<input type="hidden" id="lbl_regName" value="${USER_NAME}" >
								<input type="hidden" id="txt_regDate"  >
							</ul>
						
					</div>

				</section>


			</section>

		<!-- <aside class="grid col-one-quarter mq2-col-one-third mq3-col-full blog-sidebar">
				
			<div class="widget">
			<input id="search" type="search" name="search" value="Type and hit enter to search" >
			</div>
			
			<div class="widget">
			<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim.</p>
			</div>
			
			<div class="widget">
			<h2>Popular Posts</h2>
			<ul>
				<li><a href="#" title="">Nullam porttitor elementum ligula</a></li>
				<li><a href="#" title="">Vestibulum interdum</a></li>	
				<li><a href="#" title="">Quisque venenatis ante sit amet dolor</a></li>		
				<li><a href="#" title="">Aliquam adipiscing libero vitae leo</a></li>		
				<li><a href="#" title="">Sed accumsan quam ac tellus</a></li>	
			</ul>
			</div>
			
			<div class="widget">
			<h2>Categories</h2>
			<ul>
			 	<li><a href="http://">Design (99+)</a></li>
				<li><a href="http://">Web (53)</a></li>
				<li><a href="http://">Other (12)</a></li>
				<li><a href="http://">Weird (4)</a></li>
			</ul>
			</div>
		
			<div class="widget">
			<h2>Meta</h2>
			<ul>
				<li><a href="">Entries (RSS)</a></li>
				<li><a href="">Comments (RSS)</a></li>
			</ul>
			</div>
		</aside> -->
	
		
	</div> <!--main-->
<jsp:include page="/WEB-INF/views/comm/footer.jsp"></jsp:include>
</div>
 <script src="${pageContext.request.contextPath}/resources/js/mind/blogPost.js"></script>
</body>
</html>